package com.kexinde.wjifen.model;

import javax.persistence.Entity;

/**
 * 地址
 * 
 * @author WEI
 *
 */
@Entity
public class Address {

	/**
	 * 主键
	 */
	private Long id;
	
	/**
	 * 省
	 */
	private String province = "";
	
	/**
	 * 市
	 */
	private String city = "";
	
	/**
	 * 区
	 */
	private String area = "";
	
	/**
	 * 街道
	 */
	private String stress = "";
	
	/**
	 * 邮编
	 */
	private String postCode = "";

	/**
	 * 构造方法
	 * 动态创建实例，用于数据库读写时，反射获取对象
	 * 
	 * @param id
	 * @param province
	 * @param city
	 * @param area
	 * @param stress
	 * @param postCode
	 */
	public Address(Long id, String province, String city, String area,
			String stress, String postCode) {
		super();
		this.id = id;
		this.province = province;
		this.city = city;
		this.area = area;
		this.stress = stress;
		this.postCode = postCode;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getStress() {
		return stress;
	}

	public void setStress(String stress) {
		this.stress = stress;
	}

	public String getPostCode() {
		return postCode;
	}

	public void setPostCode(String postCode) {
		this.postCode = postCode;
	}

	/**
	 * 用于测试
	 */
	@Override
	public String toString() {
		return "Address [id=" + id + ", province=" + province + ", city="
				+ city + ", area=" + area + ", stress=" + stress
				+ ", postCode=" + postCode + "]";
	}
	
}
